package com.baizhi;

import com.baizhi.interceptor.AccountInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author admin
 */
@Configuration
public class InterceptorConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
       /* //注册过滤器
        InterceptorRegistration registration = registry.addInterceptor(new AccountInterceptor());
        registration.addPathPatterns("/**")
                .excludePathPatterns("/users")
                .excludePathPatterns("/verifyCode")
                .excludePathPatterns("/captcha")
                .excludePathPatterns("/layui/**");//放行文件夹layui下所有文件*/
    }
}
